package com.cheifsteam.springframework;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 屈燃希
 * @date 2025/1/18 22:02
 * @content
 */
public class BeanFactory {


    private Map<String, BeanDefinition> beanDefinitionMap = new HashMap<>();

    public Object getBean(String name) {
        return beanDefinitionMap.get(name).getBean();
    }

    public void registerBeanDefinition(String name, BeanDefinition beanDefinition) {
        beanDefinitionMap.put(name, beanDefinition);
    }
}
